package com.diligent.cloud.sfc.model;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import java.math.BigDecimal;
import java.util.List;

@Data
@ToString
public class OrderCompleteParams {
    @ApiModelProperty(value = "机台代码")
    private String machCode;
    @ApiModelProperty(value = "工单Id")
    private Long orderId;
    @ApiModelProperty(value = "工单号")
    private String woOrder;
    @ApiModelProperty(value = "完工数量")
    private BigDecimal completeDigit;
    @ApiModelProperty(value = "需求数量")
    private java.math.BigDecimal requireDigit;
    @ApiModelProperty(value = "生产数量")
    private java.math.BigDecimal prodDigit;
    @ApiModelProperty(value = "产出数量")
    private java.math.BigDecimal digit;
    @ApiModelProperty(value = "缺陷数量")
    private java.math.BigDecimal defectDigit;
    @ApiModelProperty(value = "报废数量")
    private java.math.BigDecimal scrapDigit;
    @ApiModelProperty(value = "合格数量")
    private java.math.BigDecimal goodDigit;
    @ApiModelProperty(value = "单位重量")
    private java.math.BigDecimal unitWeight;
    @ApiModelProperty(value = "理论重")
    private java.math.BigDecimal theoryWeight;
    @ApiModelProperty(value = "实际重")
    private java.math.BigDecimal weight;
    @ApiModelProperty(value = "容器Ids")
    private List<Long> boxIds;

    public BigDecimal getDefectDigit() {
        if (defectDigit!=null){
            return defectDigit;
        }else {
            return new BigDecimal(0);
        }
    }

    public BigDecimal getScrapDigit() {
        if (scrapDigit!=null){
            return scrapDigit;
        }else {
            return new BigDecimal(0);
        }
    }


}
